Skip to content

feat(core): scaffold Tauri 2 + Vite + React 19 project#1

Merged
mpiton merged 4 commits intomainfrom
feat/01-project-scaffolding
Apr 7, 2026
Merged

feat(core): scaffold Tauri 2 + Vite + React 19 project#1
mpiton merged 4 commits intomainfrom
feat/01-project-scaffolding

Conversation

@mpiton
Copy link
Copy Markdown
Owner

@mpiton mpiton commented Apr 7, 2026

Summary

  • Scaffold complet du projet Vortex : Tauri 2 backend + React 19 frontend
  • Architecture hexagonale Rust preparee (domain/, application/, adapters/driving/, adapters/driven/)
  • Tailwind CSS 4 avec config CSS-first et 17 design tokens
  • shadcn/ui initialise avec Button et Badge (new-york style)
  • oxlint + vitest configures et passants
  • Nix flake pour environnement de dev reproductible (Rust, Node, wasm targets, WebKitGTK)
  • CSP minimale et capabilities Tauri restreintes

Changes

Backend (src-tauri/)

  • Cargo.toml : tauri 2, serde, thiserror, tracing, tokio
  • tauri.conf.json : identifier dev.vortex.app, CSP self-only, window 1200x800
  • capabilities/default.json : core:default only
  • Hexagonal structure : domain/, application/, adapters/driving/, adapters/driven/

Frontend (src/)

  • React 19 + TypeScript strict + Vite 6
  • Tailwind CSS 4 : @theme tokens (accent, sidebar, surface, fonts Inter + IBM Plex Mono)
  • shadcn/ui : Button + Badge components
  • vitest + Testing Library + jsdom

Tooling

  • .oxlintrc.json : react, typescript, import plugins
  • vitest.config.ts : jsdom, globals, path aliases
  • flake.nix : Rust stable + wasm32 targets + Node 22 + cargo-llvm-cov

Test plan

  • cargo test --workspace : 0 tests, 0 errors
  • npx vitest run : 0 tests, 0 failures
  • cargo clippy --workspace -- -D warnings : 0 warnings
  • npm run lint (oxlint) : 0 warnings, 0 errors
  • tsc --noEmit : passes
  • npm run build : frontend builds successfully (29 modules)
  • cargo build : backend compiles

Summary by cubic

Bootstraps the Vortex app with a Tauri 2 backend and a React 19 + Vite 6 frontend. Sets up hexagonal Rust structure, Tailwind 4 + shadcn tokens, shadcn/ui, tests, linting, a reproducible Nix dev shell, and a locked‑down CSP/capabilities per the 01‑project‑scaffolding spec.

  • New Features

    • Backend: tauri 2 with hexagonal dirs (domain/, application/, adapters/*), tight CSP (style-src 'self', no unsafe-inline), default capabilities, 1200×800 window.
    • Frontend: react 19 + TypeScript strict + vite 6; Tailwind CSS 4 tokens + shadcn semantic tokens; shadcn/ui (Button, Badge); @/* path alias.
    • Tooling: vitest + Testing Library, oxlint (with --fix), Nix flake.nix dev shell (Rust stable, Node 22, wasm targets; Linux WebKitGTK libs); .gitignore ignores .env* and local docs.
  • Refactors

    • Removed unused shell plugin and tokio; no shell permission granted.
    • Fixed SPDX license to GPL-3.0-only; cleaned flake.nix (pkg-config in nativeBuildInputs, deduped).
    • Simplified .oxlintrc.json; TypeScript build: project refs for tsc -b and tsconfig.node.json now uses emitDeclarationOnly for composite builds.
    • Marked adapter docs as “planned” for the scaffold phase.

Written for commit 4ca36df. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Initial UI: app entry, reusable Button and Badge components, and app entrypoint.
  • Chores
    • Bootstrapped full project scaffold (frontend + Tauri desktop backend), package and dev/build configs, and added .gitignore.
  • Tests
    • Configured Vitest and test environment with setup and test scripts.
  • Style
    • Added Tailwind theme variables, global stylesheet, and utility class merging helper.

- Initialize Tauri 2 backend with hexagonal architecture (domain/application/adapters)
- Configure React 19 + TypeScript strict mode + Vite 6
- Setup Tailwind CSS 4 with CSS-first config and design tokens
- Add shadcn/ui with Button and Badge components (new-york style)
- Configure oxlint + vitest (jsdom + Testing Library)
- Create Nix flake for reproducible dev environment
- Set CSP policy and minimal Tauri capabilities
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

Adds initial Vortex boilerplate: a Tauri + Rust backend (library + binary), a React + Vite + Tailwind frontend with UI primitives, plus project tooling/configs (linting, testing, TypeScript, Nix flake, component config) and basic app wiring and styles.

Changes

Cohort / File(s) Summary
Repo & Package
/.gitignore, package.json
Add repo ignores for local/dev artifacts and outputs; add npm manifest with scripts, React/Tauri/Tailwind deps and dev tools.
Linting & Component Config
.oxlintrc.json, components.json
Add linter config (plugins, severities, rule tweaks) and shadcn component settings (preset, TSX, Tailwind, aliases, icon lib).
Nix DevShell
flake.nix
Add Nix flake providing devShells.default with overridden Rust toolchain, extra Rust targets, Node.js, conditional Linux libs, env hooks and RUST_BACKTRACE.
Frontend Entrypoints & Build
vite.config.ts, index.html, src/main.tsx, src/vite-env.d.ts
Add Vite config (React/Tailwind plugins, alias, dev server 1420, HMR, watch ignore), HTML entry, React bootstrap, and Vite client types.
TypeScript & Testing
tsconfig.json, tsconfig.node.json, vitest.config.ts, src/test-setup.ts
Add strict TS configs and node composite config; Vitest config (jsdom, globals, setup), and test setup import.
Frontend App & Styles
src/App.tsx, src/index.css, src/lib/utils.ts
Add App component, global Tailwind-based theme CSS, and cn() utility for class merging.
UI Primitives
src/components/ui/button.tsx, src/components/ui/badge.tsx
Add Button and Badge components with CVA variants, Radix Slot support, typed props, and exports.
Tauri Project & Config
src-tauri/Cargo.toml, src-tauri/tauri.conf.json, src-tauri/capabilities/default.json, src-tauri/build.rs
Add Cargo manifest for vortex lib, Tauri config (frontendDist/devUrl, window, CSP, bundling, icons), capability JSON, and tauri build script.
Tauri Rust Code
src-tauri/src/lib.rs, src-tauri/src/main.rs
Add Rust library entry exposing pub fn run() (tauri::Builder.run) and main.rs delegating to vortex_lib::run() with Windows subsystem suppression in release.
Architecture Modules (docs-only)
src-tauri/src/adapters/mod.rs, .../driven/mod.rs, .../driving/mod.rs, src-tauri/src/application/mod.rs, src-tauri/src/domain/mod.rs
Add module files containing documentation describing hexagonal/CQRS layers and planned adapters; no executable code.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer (Browser)
  participant Vite as Vite Dev Server
  participant Webview as Tauri Webview
  participant RustLib as vortex_lib (Rust)
  participant OS as Operating System

  Dev->>Vite: Request http://localhost:1420
  Vite-->>Dev: Serve bundle (/src/main.tsx)
  Dev->>Webview: Load app (during dev or packaged)
  Webview->>RustLib: Initialize Tauri runtime
  RustLib->>OS: Start app (tauri::Builder.run)
  OS-->>RustLib: Runtime events
  RustLib->>Webview: IPC / commands (planned)
  Webview-->>Dev: Render UI / respond to interactions
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇
I hopped into the repo, nose a-twitch,
Rust roots dug deep, React leaves stitched,
Tailwind petals, tiny components gleam,
Tauri hums softly — a new Vortex dream.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(core): scaffold Tauri 2 + Vite + React 19 project' accurately and concisely describes the primary change: setting up a new Tauri 2 + Vite + React 19 project structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/01-project-scaffolding

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 issues found across 42 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src-tauri/src/lib.rs">

<violation number="1" location="src-tauri/src/lib.rs:8">
P2: The `tauri_plugin_shell` plugin is initialized but no shell permission is granted in `capabilities/default.json` (`core:default` only). If the plugin isn't needed yet, removing it from the builder (and from `Cargo.toml`) avoids loading command-execution infrastructure that the PR's own capability policy doesn't authorize, and keeps the attack surface minimal as intended.</violation>
</file>

<file name="specs/README.md">

<violation number="1" location="specs/README.md:74">
P2: Task 27 (`i18n-theming`) is missing from the dependency map while all other tasks (01–26, 28) are present. Since the map is the authoritative guide for task ordering, this omission may cause 27 to be started without its prerequisites or be overlooked during planning.</violation>
</file>

<file name="src-tauri/Cargo.toml">

<violation number="1" location="src-tauri/Cargo.toml:7">
P2: `GPL-3.0` is a deprecated SPDX identifier. Cargo will emit a warning. Use `GPL-3.0-only` or `GPL-3.0-or-later` instead.</violation>

<violation number="2" location="src-tauri/Cargo.toml:24">
P2: tokio with `features = ["full"]` is unused and redundant — Tauri 2 already manages its own tokio runtime. This adds substantial compile time and binary bloat for zero benefit. If you later need specific tokio utilities (e.g., `sync`, `fs`), enable only those features explicitly rather than `"full"`.</violation>
</file>

<file name="flake.nix">

<violation number="1" location="flake.nix:44">
P3: `pkg-config` is duplicated: it's unconditionally in `buildInputs` and conditionally in `nativeBuildInputs` for Linux. Move it to `nativeBuildInputs` unconditionally and remove it from `buildInputs` to avoid the redundancy.</violation>
</file>

<file name="package.json">

<violation number="1" location="package.json:14">
P2: The `format` script calls `oxfmt` but the package is missing from `devDependencies`. Add `"oxfmt"` to make `npm run format` work.</violation>
</file>

<file name=".oxlintrc.json">

<violation number="1" location=".oxlintrc.json:13">
P2: `ignorePatterns` is not a recognized key in `.oxlintrc.json` and is silently ignored. Generated shadcn/ui code in `src/components/ui` will still be linted. Use CLI flags or an ignore file instead.</violation>
</file>

<file name="specs/01-mvp/01-project-scaffolding.md">

<violation number="1" location="specs/01-mvp/01-project-scaffolding.md:23">
P2: Tailwind CSS 4 uses CSS-first configuration (`@theme` in `index.css`), so `tailwind.config.ts` is no longer applicable. The project correctly configures tokens in `src/index.css` instead. Update this line to match the actual implementation (e.g., reference `src/index.css` with `@theme` design tokens) to avoid confusing future contributors reading the spec.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread src-tauri/src/lib.rs Outdated
Comment thread specs/README.md Outdated
Comment thread src-tauri/Cargo.toml Outdated
Comment thread src-tauri/Cargo.toml Outdated
Comment thread package.json Outdated
Comment thread .oxlintrc.json Outdated
Comment thread specs/01-mvp/01-project-scaffolding.md Outdated
Comment thread flake.nix Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (8)
specs/README.md (1)

11-17: Normalize French spelling/accents across the task spec.

Several lines have missing diacritics and minor phrasing issues (e.g., “tache”, “telechargement”, “des la”). A quick language pass will improve clarity and professionalism of the spec.

Also applies to: 31-33, 110-126

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/README.md` around lines 11 - 17, Perform a quick language normalization
pass on the README: add missing French diacritics and fix minor phrasing across
the listed bullets (e.g., change "tache" → "tâche", "Verifier" → "Vérifier",
"dependances" → "dépendances", "des la" → "dès la", "telechargement" →
"téléchargement", and convert "success criteria" → "critères de succès" where
appropriate), preserve the original intent and formatting of bullets such as
"Lire la tache complete avant de commencer", "Suivre l'architecture hexagonale :
domain (pur) → application (CQRS) → adapters", and the CLAUDE.md note, and apply
the same diacritic/phrasing fixes to the corresponding occurrences referenced in
lines 31-33 and 110-126.
src-tauri/src/adapters/driving/mod.rs (1)

3-3: Consider marking listed adapters as “planned” to avoid overpromising in docs.

Current wording reads as present functionality; for scaffold-only state, “Planned includes …” keeps docs accurate.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src-tauri/src/adapters/driving/mod.rs` at line 3, Update the module doc
comment that currently reads "Includes: Tauri IPC handlers, REST API (axum), CLI
headless mode." to indicate these adapters are planned/scaffold-only (e.g.,
prepend "Planned includes:" or "Planned:") so the documentation doesn't imply
implemented functionality; locate and edit the top-of-file module doc comment
string in mod.rs where that sentence appears and adjust the wording accordingly.
.gitignore (1)

10-12: Add .env patterns to reduce accidental secret commits.

Given this scaffold will likely use environment files, add ignore rules for .env variants and keep examples tracked.

🔧 Proposed `.gitignore` update
 .insaits*
 node_modules/
 dist/
 target/
 .vite/
 *.swp
 *.swo
 .DS_Store
+.env
+.env.*
+!.env.example
 
 # Nix
 result
 .direnv/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 10 - 12, Add ignore rules for environment files to
prevent accidental secret commits: update the .gitignore to include common .env
patterns (e.g., .env, .env.*, *.env.local) while ensuring example files remain
tracked (e.g., keep .env.example or .env.sample out of the ignore rules). Locate
the existing Nix entries such as "result" and ".direnv/" as nearby context and
append the new .env patterns below them so environment files are ignored but
example files are preserved.
src-tauri/src/adapters/driven/mod.rs (1)

1-4: Consider marking listed driven adapters as planned.

The wording currently reads as implemented scope. A tiny phrasing tweak (“planned includes…”) would reduce ambiguity in this scaffold phase.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src-tauri/src/adapters/driven/mod.rs` around lines 1 - 4, Update the
module-level doc comment at the top of mod.rs that currently lists implemented
adapters so it reads that these are planned rather than implemented (e.g.,
change "Includes: SQLite (sea-orm), filesystem, HTTP client (reqwest), plugin
loader (Extism), keychain, clipboard, event bus." to "Planned includes: SQLite
(sea-orm), filesystem, HTTP client (reqwest), plugin loader (Extism), keychain,
clipboard, event bus."), i.e., edit the module docstring comment block to use
"Planned" or "Planned includes" to avoid implying they are already implemented.
tsconfig.json (1)

1-25: Add references for proper tsc -b project builds.

The build script in package.json uses tsc -b (project build mode), which requires a references array to include tsconfig.node.json. Without it, vite.config.ts won't be type-checked during builds.

♻️ Proposed fix to add project references
     }
   },
-  "include": ["src"]
+  "include": ["src"],
+  "references": [{ "path": "./tsconfig.node.json" }]
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tsconfig.json` around lines 1 - 25, Add a "references" array to tsconfig.json
so project build mode (tsc -b) includes the additional config used for tooling;
specifically, update tsconfig.json to reference tsconfig.node.json by adding a
"references": [{ "path": "tsconfig.node.json" }] entry at the top-level
alongside "compilerOptions" and "include" so that Vite-related files (e.g.,
vite.config.ts) are type-checked during tsc -b builds.
src-tauri/Cargo.toml (1)

24-24: Consider scoping tokio features for a leaner build.

The features = ["full"] includes everything (I/O, time, sync, macros, etc.). For a desktop app, you likely need only a subset. However, this is acceptable for scaffolding—you can trim features later when the actual async requirements are clearer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src-tauri/Cargo.toml` at line 24, The tokio dependency currently enables the
heavyweight "full" feature set; to reduce binary size and compile times, replace
features = ["full"] with a scoped list of only the runtime and components you
actually use (e.g., runtime, io, time, sync, macros) and iterate: update the
tokio entry to remove "full" and add explicit features such as
"rt-multi-thread", "macros", "io", "time", or whichever of those your code uses
(adjust Cargo.toml's tokio dependency until compilation succeeds and only
required features remain).
flake.nix (2)

52-58: pkg-config should be in nativeBuildInputs, not buildInputs.

pkg-config is a build-time tool and should be placed in nativeBuildInputs for correctness. Currently it's added unconditionally to buildInputs (line 57), while it's also conditionally added to nativeBuildInputs for Linux (lines 43-45). This results in:

  • On Linux: redundant inclusion in both lists
  • On macOS: incorrect placement in buildInputs only
♻️ Proposed fix
-        linuxNativeBuildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [
-          pkgs.pkg-config
-        ];
+        linuxNativeBuildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [];

       in
       {
         devShells.default = pkgs.mkShell {
-          nativeBuildInputs = linuxNativeBuildInputs;
+          nativeBuildInputs = [
+            pkgs.pkg-config
+          ] ++ linuxNativeBuildInputs;

           buildInputs = [
             rustToolchain
             pkgs.nodejs_22
             pkgs.cargo-llvm-cov
             pkgs.openssl
-            pkgs.pkg-config
           ] ++ linuxBuildInputs;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flake.nix` around lines 52 - 58, Remove pkgs.pkg-config from the buildInputs
list and place it into nativeBuildInputs instead: edit the buildInputs array
(symbol: buildInputs) to drop pkgs.pkg-config, and add pkgs.pkg-config to the
nativeBuildInputs array (symbol: nativeBuildInputs) so pkg-config is only a
native build-time dependency (preserving any existing linux-only additions via
linuxBuildInputs).

21-24: Consider removing unused wasm targets unless planned for future WASM plugin compilation.

The wasm packages in Cargo.lock (wasm-bindgen, wasm-encoder, etc.) are transitive dependencies from Tauri for JavaScript interop, not because the project compiles to WebAssembly. The wasm32-wasip1 and wasm32-unknown-unknown targets in the Rust toolchain are not being used in the current codebase. If there are no concrete plans for WASM plugin support, removing these targets reduces unnecessary toolchain overhead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flake.nix` around lines 21 - 24, The flake currently configures rustToolchain
with targets = [ "wasm32-wasip1" "wasm32-unknown-unknown" ] which pulls unused
WASM toolchain components; remove those two target entries from the targets
array in the rustToolchain override (leave extensions as-is) unless you have a
concrete plan to compile WASM plugins or depend on those targets, to reduce
toolchain bloat.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@specs/01-mvp/01-project-scaffolding.md`:
- Line 23: Update the docs to reflect Tailwind v4's CSS-first configuration by
removing or correcting the `tailwind.config.ts` reference and pointing to the
CSS-based setup (e.g., `src/index.css` using `@theme` directives); mention that
design tokens (colors, fonts like IBM Plex Mono/Inter) are defined via CSS layer
rules and `@theme` rather than a TypeScript config file so readers look at
`src/index.css` for configuration instead of `tailwind.config.ts`.

In `@specs/README.md`:
- Line 7: Update the "**Current State**" line in specs/README.md: replace the
phrase "aucun code" with a correct baseline description noting the repository
already contains scaffolding and that task 01 is completed (e.g., "scaffolding
initial présent; PRD, ARCHI et CLAUDE.md existants; tâche 01 complétée") so the
README no longer claims "aucun code".
- Around line 67-106: The fenced ASCII dependency map block currently begins
with ``` (the large diagram between triple backticks) and lacks a language
identifier; update that opening fence to include a language token (e.g.,
```text) so the code block declares a language and satisfies MD040 linting,
leaving the diagram content unchanged.

---

Nitpick comments:
In @.gitignore:
- Around line 10-12: Add ignore rules for environment files to prevent
accidental secret commits: update the .gitignore to include common .env patterns
(e.g., .env, .env.*, *.env.local) while ensuring example files remain tracked
(e.g., keep .env.example or .env.sample out of the ignore rules). Locate the
existing Nix entries such as "result" and ".direnv/" as nearby context and
append the new .env patterns below them so environment files are ignored but
example files are preserved.

In `@flake.nix`:
- Around line 52-58: Remove pkgs.pkg-config from the buildInputs list and place
it into nativeBuildInputs instead: edit the buildInputs array (symbol:
buildInputs) to drop pkgs.pkg-config, and add pkgs.pkg-config to the
nativeBuildInputs array (symbol: nativeBuildInputs) so pkg-config is only a
native build-time dependency (preserving any existing linux-only additions via
linuxBuildInputs).
- Around line 21-24: The flake currently configures rustToolchain with targets =
[ "wasm32-wasip1" "wasm32-unknown-unknown" ] which pulls unused WASM toolchain
components; remove those two target entries from the targets array in the
rustToolchain override (leave extensions as-is) unless you have a concrete plan
to compile WASM plugins or depend on those targets, to reduce toolchain bloat.

In `@specs/README.md`:
- Around line 11-17: Perform a quick language normalization pass on the README:
add missing French diacritics and fix minor phrasing across the listed bullets
(e.g., change "tache" → "tâche", "Verifier" → "Vérifier", "dependances" →
"dépendances", "des la" → "dès la", "telechargement" → "téléchargement", and
convert "success criteria" → "critères de succès" where appropriate), preserve
the original intent and formatting of bullets such as "Lire la tache complete
avant de commencer", "Suivre l'architecture hexagonale : domain (pur) →
application (CQRS) → adapters", and the CLAUDE.md note, and apply the same
diacritic/phrasing fixes to the corresponding occurrences referenced in lines
31-33 and 110-126.

In `@src-tauri/Cargo.toml`:
- Line 24: The tokio dependency currently enables the heavyweight "full" feature
set; to reduce binary size and compile times, replace features = ["full"] with a
scoped list of only the runtime and components you actually use (e.g., runtime,
io, time, sync, macros) and iterate: update the tokio entry to remove "full" and
add explicit features such as "rt-multi-thread", "macros", "io", "time", or
whichever of those your code uses (adjust Cargo.toml's tokio dependency until
compilation succeeds and only required features remain).

In `@src-tauri/src/adapters/driven/mod.rs`:
- Around line 1-4: Update the module-level doc comment at the top of mod.rs that
currently lists implemented adapters so it reads that these are planned rather
than implemented (e.g., change "Includes: SQLite (sea-orm), filesystem, HTTP
client (reqwest), plugin loader (Extism), keychain, clipboard, event bus." to
"Planned includes: SQLite (sea-orm), filesystem, HTTP client (reqwest), plugin
loader (Extism), keychain, clipboard, event bus."), i.e., edit the module
docstring comment block to use "Planned" or "Planned includes" to avoid implying
they are already implemented.

In `@src-tauri/src/adapters/driving/mod.rs`:
- Line 3: Update the module doc comment that currently reads "Includes: Tauri
IPC handlers, REST API (axum), CLI headless mode." to indicate these adapters
are planned/scaffold-only (e.g., prepend "Planned includes:" or "Planned:") so
the documentation doesn't imply implemented functionality; locate and edit the
top-of-file module doc comment string in mod.rs where that sentence appears and
adjust the wording accordingly.

In `@tsconfig.json`:
- Around line 1-25: Add a "references" array to tsconfig.json so project build
mode (tsc -b) includes the additional config used for tooling; specifically,
update tsconfig.json to reference tsconfig.node.json by adding a "references":
[{ "path": "tsconfig.node.json" }] entry at the top-level alongside
"compilerOptions" and "include" so that Vite-related files (e.g.,
vite.config.ts) are type-checked during tsc -b builds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb759d4c-18fb-4215-ad61-3f03a1cd76d4

📥 Commits

Reviewing files that changed from the base of the PR and between c642953 and 33694d2.

⛔ Files ignored due to path filters (10)
  • package-lock.json is excluded by !**/package-lock.json
  • src-tauri/Cargo.lock is excluded by !**/*.lock
  • src-tauri/gen/schemas/acl-manifests.json is excluded by !**/gen/**
  • src-tauri/gen/schemas/capabilities.json is excluded by !**/gen/**
  • src-tauri/gen/schemas/desktop-schema.json is excluded by !**/gen/**
  • src-tauri/gen/schemas/linux-schema.json is excluded by !**/gen/**
  • src-tauri/icons/128x128.png is excluded by !**/*.png
  • src-tauri/icons/128x128@2x.png is excluded by !**/*.png
  • src-tauri/icons/32x32.png is excluded by !**/*.png
  • src-tauri/icons/icon.ico is excluded by !**/*.ico
📒 Files selected for processing (32)
  • .gitignore
  • .oxlintrc.json
  • components.json
  • flake.nix
  • index.html
  • package.json
  • specs/01-mvp/01-project-scaffolding.md
  • specs/README.md
  • src-tauri/Cargo.toml
  • src-tauri/build.rs
  • src-tauri/capabilities/default.json
  • src-tauri/icons/icon.icns
  • src-tauri/src/adapters/driven/mod.rs
  • src-tauri/src/adapters/driving/mod.rs
  • src-tauri/src/adapters/mod.rs
  • src-tauri/src/application/mod.rs
  • src-tauri/src/domain/mod.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/main.rs
  • src-tauri/tauri.conf.json
  • src/App.tsx
  • src/components/ui/badge.tsx
  • src/components/ui/button.tsx
  • src/index.css
  • src/lib/utils.ts
  • src/main.tsx
  • src/test-setup.ts
  • src/vite-env.d.ts
  • tsconfig.json
  • tsconfig.node.json
  • vite.config.ts
  • vitest.config.ts

Comment thread specs/01-mvp/01-project-scaffolding.md Outdated
- `package.json` — React 19, Vite, TypeScript, Tailwind, dependencies frontend
- `vite.config.ts` — Config Vite pour Tauri
- `tsconfig.json` — Strict mode TypeScript
- `tailwind.config.ts` — Design tokens (colors, fonts IBM Plex Mono + Inter)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Tailwind CSS 4 uses CSS-first configuration, not tailwind.config.ts.

The PR summary mentions Tailwind CSS 4 with a CSS-first configuration approach. Tailwind v4 moved away from JavaScript/TypeScript config files to CSS-based configuration using @theme directives in CSS files. Consider updating this reference to reflect the actual configuration approach (likely in src/index.css).

🧰 Tools
🪛 LanguageTool

[grammar] ~23-~23: Il y a peut-être une erreur ici
Context: ...t mode TypeScript - tailwind.config.ts — Design tokens (colors, fonts IBM Plex Mono + I...

(QB_NEW_FR)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/01-mvp/01-project-scaffolding.md` at line 23, Update the docs to
reflect Tailwind v4's CSS-first configuration by removing or correcting the
`tailwind.config.ts` reference and pointing to the CSS-based setup (e.g.,
`src/index.css` using `@theme` directives); mention that design tokens (colors,
fonts like IBM Plex Mono/Inter) are defined via CSS layer rules and `@theme`
rather than a TypeScript config file so readers look at `src/index.css` for
configuration instead of `tailwind.config.ts`.

Comment thread specs/README.md Outdated
**From PRD**: Vortex est un gestionnaire de telechargements desktop open-source (GPLv3), successeur de JDownloader. Architecture plugin-first, Tauri 2 + Rust backend + React frontend. Cible les power users Linux/macOS/Windows.
**Tech Stack**: Tauri 2, Rust (tokio, sea-orm, axum, reqwest, extism), React 19, TypeScript, Zustand, TanStack Query/Table, shadcn/ui, Tailwind CSS 4
**Architecture**: Hexagonale (Ports & Adapters) + CQRS + TDD (Red-Green-Refactor)
**Current State**: Projet vierge — PRD, ARCHI et CLAUDE.md existent, aucun code.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Update project state to match actual repository baseline.

Line 7 says the repo has “aucun code”, but this PR already ships scaffolding and Line 22 marks task 01 done. Please update this line to avoid onboarding confusion.

Suggested edit
-**Current State**: Projet vierge — PRD, ARCHI et CLAUDE.md existent, aucun code.
+**Current State**: Base du projet initialisée — scaffolding Tauri 2 + Vite + React en place, PRD/ARCHI/CLAUDE.md disponibles.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Current State**: Projet vierge — PRD, ARCHI et CLAUDE.md existent, aucun code.
**Current State**: Base du projet initialisée — scaffolding Tauri 2 + Vite + React en place, PRD/ARCHI/CLAUDE.md disponibles.
🧰 Tools
🪛 LanguageTool

[grammar] ~7-~7: «  projet  » semble plus probable dans ce contexte
Context: ...D (Red-Green-Refactor) Current State: Projet vierge — PRD, ARCHI et CLAUDE.md existent, aucun cod...

(QB_NEW_FR_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/README.md` at line 7, Update the "**Current State**" line in
specs/README.md: replace the phrase "aucun code" with a correct baseline
description noting the repository already contains scaffolding and that task 01
is completed (e.g., "scaffolding initial présent; PRD, ARCHI et CLAUDE.md
existants; tâche 01 complétée") so the README no longer claims "aucun code".

Comment thread specs/README.md Outdated
Comment on lines +67 to +106
```
┌──────────────────┐
│ 01 Scaffolding │
└────────┬─────────┘
┌──────────────┼──────────────┐
▼ ▼ ▼
┌────────────┐ ┌──────────┐ ┌──────────┐
│02 CI+Hooks │ │16 Layout │ │28 Release│
│pre-commit │ └────┬─────┘ └──────────┘
│pre-push │ ▼
└────────────┘ ┌──────────┐
│ │17 IPC │
▼ │ Layer │
┌──────────┐ └────┬─────┘
│03 Domain │ ┌───┼───┬───┬───┬───┐
│ Models │ ▼ ▼ ▼ ▼ ▼ ▼
└────┬─────┘ 18 19 20 21 22 23
▼ ▼ ▼
┌──────────┐ 19 21
│04 Ports │
└────┬─────┘
┌────┬────┼────┬───┐
▼ ▼ ▼ ▼ ▼
┌──┐ ┌──┐ ┌──┐ ┌──┐┌──┐
│05│ │06│ │07│ │08││13│
└┬─┘ └──┘ └┬─┘ └┬─┘└┬─┘
│ ▼ ▼ ▼
│ ┌──┐ ┌──┐ ┌──┐
│ │09│ │10│ │14│
│ └──┘ └──┘ └┬─┘
▼ ┌─┼──┐
┌──────────┐ │ ▼ ▼
│11 Cmds │ ┌──┐┌──┐┌──┐
│12 Queries│ │15││24││25│
└──────────┘ └──┘└──┘└──┘
┌──┐
│26│
└──┘
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language identifier to the fenced code block.

The dependency map fence should declare a language (Line 67) to satisfy markdown linting (MD040).

Suggested edit
-```
+```text
...
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 67-67: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@specs/README.md` around lines 67 - 106, The fenced ASCII dependency map block
currently begins with ``` (the large diagram between triple backticks) and lacks
a language identifier; update that opening fence to include a language token
(e.g., ```text) so the code block declares a language and satisfies MD040
linting, leaving the diagram content unchanged.

Local-only documentation files should not be tracked in git.
@mpiton
Copy link
Copy Markdown
Owner Author

mpiton commented Apr 7, 2026

@greptileai

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 7, 2026

Greptile Summary

This PR bootstraps the Vortex desktop app with a Tauri 2 backend and React 19 + Vite 6 frontend, including hexagonal Rust module structure, Tailwind CSS 4 design tokens, shadcn/ui components, and a reproducible Nix dev shell. It is a clean scaffold with no runtime logic yet.

Two items worth addressing before the components are actively used:

  • src/index.css defines project-specific color tokens (--color-accent, --color-surface, etc.) but omits the shadcn semantic tokens (primary, secondary, destructive, ring, background, input, foreground) that Button and Badge reference — those components will render without visible styles until the tokens are added.
  • tauri-plugin-shell is registered in lib.rs but no shell:* permission is present in capabilities/default.json, so the plugin cannot be invoked from the frontend.

Confidence Score: 5/5

Safe to merge — this is a clean scaffold with no runtime logic; all findings are P2 style/best-practice issues that don't affect the current application.

All remaining findings are P2. The missing CSS tokens and plugin capability mismatch are deferred issues that only matter once the components and shell commands are actively used. The scaffold builds, lints, and type-checks cleanly.

src/index.css (missing shadcn semantic tokens) and src-tauri/src/lib.rs + src-tauri/capabilities/default.json (shell plugin vs capability mismatch)

Important Files Changed

Filename Overview
src-tauri/tauri.conf.json App config is correct; CSP includes unsafe-inline for style-src which can be tightened later
src-tauri/Cargo.toml Standard Tauri 2 + Rust dependency set with appropriate crate selections
src-tauri/src/lib.rs Registers tauri-plugin-shell but no matching capability permission exists in capabilities/default.json
src-tauri/capabilities/default.json Only core:default granted; shell:* permission missing despite shell plugin being initialized
src/index.css Defines project design tokens but omits shadcn semantic tokens (primary, secondary, ring, etc.) referenced by Button and Badge
src/components/ui/button.tsx Standard shadcn Button; will render without visible styles until CSS token mappings are added
src/components/ui/badge.tsx Standard shadcn Badge; same missing token issue as Button
package.json Clean dependency set with correct dev/prod split; scripts cover dev, build, test, lint, and format
flake.nix Solid reproducible dev shell with Rust stable, Node 22, wasm targets, and Linux WebKitGTK libs
vite.config.ts Correct Tauri-aware Vite config with HMR support, path alias, and src-tauri watcher exclusion
vitest.config.ts Correct jsdom + React testing setup; passWithNoTests: true is intentional for scaffold phase
.oxlintrc.json Well-configured linter with src/components/ui correctly excluded for generated shadcn files

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Frontend["Frontend (src/)"]
        main["main.tsx"] --> App["App.tsx"]
        App --> CSS["index.css\n(Tailwind 4 @theme tokens)"]
        UI1["components/ui/Button"] -.->|references| CSS
        UI2["components/ui/Badge"] -.->|references| CSS
        style CSS fill:#fef9c3,stroke:#ca8a04
    end

    subgraph Backend["Backend (src-tauri/)"]
        main_rs["main.rs"] --> lib_rs["lib.rs"]
        lib_rs --> shell["tauri_plugin_shell::init()"] 
        lib_rs --> domain["domain/"]
        lib_rs --> app["application/"]
        lib_rs --> adapters["adapters/driving + driven"]
        caps["capabilities/default.json\n(core:default only)"] -.->|missing shell:*| shell
        style shell fill:#fef9c3,stroke:#ca8a04
        style caps fill:#fef9c3,stroke:#ca8a04
    end

    Frontend -->|Tauri IPC| Backend
    Vite["Vite 6 + HMR"] --> Frontend
    TauriConf["tauri.conf.json\n(CSP: style-src unsafe-inline)"] --> Backend
    style TauriConf fill:#fef9c3,stroke:#ca8a04
Loading

Fix All in Claude Code

Reviews (1): Last reviewed commit: "chore: remove specs from version control" | Re-trigger Greptile

Comment thread src/index.css
Comment on lines +2 to +23

@theme {
--color-accent: #6366f1;
--color-accent-hover: #4f46e5;
--color-sidebar-bg: #0f172a;
--color-sidebar-text: #e2e8f0;
--color-surface: #ffffff;
--color-surface-dark: #1e293b;
--color-muted: #64748b;
--color-border: #e2e8f0;
--color-border-dark: #334155;
--color-success: #22c55e;
--color-warning: #f59e0b;
--color-error: #ef4444;

--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
--font-mono: "IBM Plex Mono", ui-monospace, monospace;

--radius-sm: 0.25rem;
--radius-md: 0.375rem;
--radius-lg: 0.5rem;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing shadcn semantic CSS tokens

The @theme block defines custom project tokens but omits the semantic variables that Button and Badge reference: primary, primary-foreground, secondary, secondary-foreground, destructive, destructive-foreground, background, input, ring, and foreground. In Tailwind v4's CSS-first approach these must be declared explicitly; classes like bg-primary or focus:ring-ring will produce no output until they are defined.

A minimal addition to wire shadcn tokens to the existing project tokens:

@theme {
  /* … existing tokens … */

  /* shadcn semantic mappings */
  --color-primary:             var(--color-accent);
  --color-primary-foreground:  #ffffff;
  --color-secondary:           var(--color-surface-dark);
  --color-secondary-foreground: var(--color-sidebar-text);
  --color-destructive:         var(--color-error);
  --color-destructive-foreground: #ffffff;
  --color-background:          var(--color-surface);
  --color-foreground:          #0f172a;
  --color-input:               var(--color-border);
  --color-ring:                var(--color-accent);
}

Fix in Claude Code

Comment thread src-tauri/src/lib.rs
Comment on lines +7 to +9
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.run(tauri::generate_context!())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Shell plugin registered without a capability grant

tauri_plugin_shell::init() is added to the builder, but capabilities/default.json only grants "core:default". The Tauri 2 permission model requires an explicit shell:allow-execute (or shell:default) entry in the capabilities file before the frontend can invoke any shell command. As long as the capability is absent, any Command::new(…).spawn() call from the frontend will fail with a permission denied error at runtime. If the shell plugin is intentional, add the permission; if not, remove the plugin registration.

// Remove if not needed in this scaffold:
// .plugin(tauri_plugin_shell::init())

Fix in Claude Code

Comment thread src-tauri/tauri.conf.json
Comment on lines +22 to +24
"security": {
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 unsafe-inline in style-src CSP

The current CSP is style-src 'self' 'unsafe-inline'. While common with CSS frameworks that inject inline styles, 'unsafe-inline' allows injected <style> tags from any script that runs in the webview. For a desktop app the attack surface is smaller than a browser, but it still weakens the Content Security Policy. Tailwind v4 generates all styles at build time into a static sheet — no runtime injection is needed — so 'unsafe-inline' can be dropped once the app is fully wired up.

Fix in Claude Code

- Remove unused tauri-plugin-shell and tokio (no shell permission granted)
- Fix SPDX license identifier: GPL-3.0 → GPL-3.0-only
- Move pkg-config to nativeBuildInputs, remove duplicates in flake.nix
- Remove invalid ignorePatterns from .oxlintrc.json
- Add tsconfig references for tsc -b project builds
- Add .env patterns to .gitignore
- Mark adapter doc comments as "planned" (scaffold phase)
- Replace broken oxfmt script with oxlint --fix
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
flake.nix (1)

62-64: Minor: trailing colon in LD_LIBRARY_PATH if unset.

If LD_LIBRARY_PATH is initially unset, the concatenation leaves a trailing colon, which implicitly includes the current working directory in the library search path. This is minor in a dev shell context but can be avoided.

💡 Cleaner pattern
           '' + pkgs.lib.optionalString pkgs.stdenv.isLinux ''
-            export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath linuxLibs}:$LD_LIBRARY_PATH"
+            export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath linuxLibs}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
             export GIO_MODULE_PATH="${pkgs.glib-networking}/lib/gio/modules"
           '';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flake.nix` around lines 62 - 64, The LD_LIBRARY_PATH export can produce a
trailing colon when LD_LIBRARY_PATH is unset; update the export that builds
LD_LIBRARY_PATH (near pkgs.lib.optionalString / makeLibraryPath linuxLibs) to
append the existing LD_LIBRARY_PATH only when it is non-empty using POSIX
parameter expansion (e.g. use LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:...} pattern)
so the current working directory is not implicitly added; leave the
GIO_MODULE_PATH export (pkgs.glib-networking) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@flake.nix`:
- Around line 62-64: The LD_LIBRARY_PATH export can produce a trailing colon
when LD_LIBRARY_PATH is unset; update the export that builds LD_LIBRARY_PATH
(near pkgs.lib.optionalString / makeLibraryPath linuxLibs) to append the
existing LD_LIBRARY_PATH only when it is non-empty using POSIX parameter
expansion (e.g. use LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:...} pattern) so the
current working directory is not implicitly added; leave the GIO_MODULE_PATH
export (pkgs.glib-networking) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b2c11486-9615-4e39-b8ad-fb0c18fae94e

📥 Commits

Reviewing files that changed from the base of the PR and between 4804795 and 60a68c8.

⛔ Files ignored due to path filters (1)
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .gitignore
  • .oxlintrc.json
  • flake.nix
  • package.json
  • src-tauri/Cargo.toml
  • src-tauri/src/adapters/driven/mod.rs
  • src-tauri/src/adapters/driving/mod.rs
  • src-tauri/src/lib.rs
  • tsconfig.json
  • tsconfig.node.json
✅ Files skipped from review due to trivial changes (7)
  • src-tauri/src/adapters/driving/mod.rs
  • .oxlintrc.json
  • src-tauri/src/adapters/driven/mod.rs
  • .gitignore
  • tsconfig.node.json
  • package.json
  • tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • src-tauri/src/lib.rs
  • src-tauri/Cargo.toml

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 11 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tsconfig.node.json">

<violation number="1" location="tsconfig.node.json:12">
P1: `noEmit: false` makes this tsconfig invalid with `allowImportingTsExtensions`, causing `tsc` to fail with TS5096.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread tsconfig.node.json Outdated
- Fix P1: replace noEmit+allowImportingTsExtensions with emitDeclarationOnly
  in tsconfig.node.json for composite project references compatibility
- Add shadcn semantic CSS tokens (background, foreground, primary, secondary,
  destructive, card, popover, input, ring) to index.css @theme block
- Remove unsafe-inline from CSP style-src directive
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/index.css`:
- Line 3: Stylelint is flagging the Tailwind v4 at-rule "@theme"; update the
Stylelint configuration (.stylelintrc.json) to whitelist Tailwind at-rules by
adding an ignoreAtRules array to the scss/at-rule-no-unknown rule containing
"theme", "utility", "variant", and "custom-variant" so `@theme` (and related
at-rules) are not treated as unknown.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cad77102-9084-4584-8ca2-4f5ef22dc582

📥 Commits

Reviewing files that changed from the base of the PR and between 60a68c8 and 4ca36df.

📒 Files selected for processing (3)
  • src-tauri/tauri.conf.json
  • src/index.css
  • tsconfig.node.json
✅ Files skipped from review due to trivial changes (2)
  • tsconfig.node.json
  • src-tauri/tauri.conf.json

Comment thread src/index.css
@@ -0,0 +1,39 @@
@import "tailwindcss";

@theme {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether Stylelint config already allows Tailwind v4 at-rules.

fd -HI 'stylelint|.stylelintrc' . | sed 's#^\./##'

# Inspect configs for at-rule handling and Tailwind-specific ignores.
rg -n -C3 'at-rule-no-unknown|ignoreAtRules|tailwind|theme|utility|variant|custom-variant' $(fd -HI 'stylelint|.stylelintrc' .)

Repository: mpiton/vortex

Length of output: 74


🏁 Script executed:

cat -n .stylelintrc.json

Repository: mpiton/vortex

Length of output: 1273


🏁 Script executed:

# Check if there are any other Stylelint configs or plugins
fd -HI '.stylelintrc|stylelint.config' .

Repository: mpiton/vortex

Length of output: 76


Stylelint will flag @theme without Tailwind v4 at-rule configuration.

Line 3 uses the valid Tailwind v4 @theme at-rule, but your Stylelint config (scss/at-rule-no-unknown) will fail on it. Add an ignoreAtRules array to your .stylelintrc.json to whitelist theme, utility, variant, and custom-variant:

"ignoreAtRules": ["theme", "utility", "variant", "custom-variant"]

This prevents lint breakage in CI workflows.

🧰 Tools
🪛 Stylelint (17.6.0)

[error] 3-3: Unexpected unknown at-rule "@theme" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/index.css` at line 3, Stylelint is flagging the Tailwind v4 at-rule
"@theme"; update the Stylelint configuration (.stylelintrc.json) to whitelist
Tailwind at-rules by adding an ignoreAtRules array to the
scss/at-rule-no-unknown rule containing "theme", "utility", "variant", and
"custom-variant" so `@theme` (and related at-rules) are not treated as unknown.

@mpiton mpiton merged commit 76d28e3 into main Apr 7, 2026
3 checks passed
mpiton added a commit that referenced this pull request Apr 27, 2026
`HistoryRepository::record` had no production caller, leaving the
`history` table empty after every completed download. The History
view, redownload-from-history (P0.9), and the retention purge worker
(P0.14) all silently no-op as a result.

Mirror the existing `spawn_stats_recorder_bridge` pattern: subscribe
to `DownloadCompletedPersisted`, load the `Download` aggregate, derive
a `HistoryEntry` (file_size with downloaded_bytes fallback, ms→s
conversion with 1s floor for avg_speed) and call
`HistoryRepository::record`. Swallow repo errors with warn-level
tracing so a history write failure never propagates into the queue.

Tests:
- 7 unit tests covering the projection, fallback, ms→s conversion,
  duration floor, non-completed-event filtering, missing-download path,
  and error swallowing on both sides.
- 2 tokio integration tests (one against `RecordingHistoryRepo` via
  `TokioEventBus`, one against `SqliteHistoryRepo` via `setup_test_db`)
  to lock down the regression end-to-end.

Refs: vortex-qa BUG #1
mpiton added a commit that referenced this pull request Apr 27, 2026
…ge (#120)

* fix(core): record completed downloads into history via event bus bridge

`HistoryRepository::record` had no production caller, leaving the
`history` table empty after every completed download. The History
view, redownload-from-history (P0.9), and the retention purge worker
(P0.14) all silently no-op as a result.

Mirror the existing `spawn_stats_recorder_bridge` pattern: subscribe
to `DownloadCompletedPersisted`, load the `Download` aggregate, derive
a `HistoryEntry` (file_size with downloaded_bytes fallback, ms→s
conversion with 1s floor for avg_speed) and call
`HistoryRepository::record`. Swallow repo errors with warn-level
tracing so a history write failure never propagates into the queue.

Tests:
- 7 unit tests covering the projection, fallback, ms→s conversion,
  duration floor, non-completed-event filtering, missing-download path,
  and error swallowing on both sides.
- 2 tokio integration tests (one against `RecordingHistoryRepo` via
  `TokioEventBus`, one against `SqliteHistoryRepo` via `setup_test_db`)
  to lock down the regression end-to-end.

Refs: vortex-qa BUG #1

* fix: address PR review comments

---------

Co-authored-by: Mathieu Piton <27002047+mpiton@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant